package com.shardingsphereproxy.springbootshardingsphereproxy.controller;


import com.shardingsphereproxy.springbootshardingsphereproxy.entity.User;
import com.shardingsphereproxy.springbootshardingsphereproxy.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @description:
 * @author: ZeckZheng
 * @time: 2023/10/23 23:39
 */
@RestController
@RequestMapping("/test")
public class TestController {
    @Autowired
    private TestService testService;

    @RequestMapping("/query")
    public User queryUser(Integer id) {
        return testService.queryUser(id);
    }

    @RequestMapping("/create/order")
    public void createOrder() {
        //testService.createOrder();
        //testService.createOrder1();
        testService.createOrder2();
    }


}
